import request from '@/utils/request'

// 查询预报天气列表
export function listForecast(query) {
  return request({
    url: '/yanjing/forecast/list',
    method: 'get',
    params: query
  })
}

// 查询预报天气详细
export function getForecast(id) {
  return request({
    url: '/yanjing/forecast/' + id,
    method: 'get'
  })
}

// 新增预报天气
export function addForecast(data) {
  return request({
    url: '/yanjing/forecast',
    method: 'post',
    data: data
  })
}

// 修改预报天气
export function updateForecast(data) {
  return request({
    url: '/yanjing/forecast',
    method: 'put',
    data: data
  })
}

// 删除预报天气
export function delForecast(id) {
  return request({
    url: '/yanjing/forecast/' + id,
    method: 'delete'
  })
}
